package com.yupi.usercenter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yupi.usercenter.model.dto.MonitorWoExcelDTO;
import com.yupi.usercenter.model.dto.MonitorWoPageDTO;
import com.yupi.usercenter.model.entity.MonitorWo;
import com.yupi.usercenter.model.entity.MonitorWoLog;
import com.yupi.usercenter.model.vo.MonitorWoExcelVO;
import com.yupi.usercenter.model.vo.MonitorWoPageVO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 云路供应链科技有限公司 版权所有 © Copyright 2020
 * <p>
 * 监控工单表 Mapper 接口
 *
 * @author jiweiyu
 * @version 1.0.0
 * @date Created in 2021-03-05
 */
public interface MonitorWoMapper extends BaseMapper<MonitorWo> {

    int selectPagesCount(@Param("dto") MonitorWoPageDTO dto);

    List<MonitorWoPageVO> selectPages(@Param("dto") MonitorWoPageDTO dto, @Param("current")int current, @Param("size")int size);

    int exportCount(@Param("dto") MonitorWoExcelDTO dto);

    List<MonitorWoExcelVO> export(@Param("dto") MonitorWoExcelDTO dto, @Param("current")int current, @Param("size")int size);

    List<MonitorWo> selectAll(@Param("queryType") Integer queryType,@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    void batchUpdateTypeById(@Param("codesList") List<MonitorWo> CodesInfoByDateList);

    void updateRepairData(@Param("problemTypeCode")String problemTypeCode, @Param("problemTypeSubjectCode")String problemTypeSubjectCode);

    void updateAllRepairData(@Param("problemTypeCode")String problemTypeCode, @Param("problemTypeSubjectCode")String problemTypeSubjectCode);

    List<MonitorWoLog> needRepairData(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

}
